# For more information about using CMake with Android Studio, read the
# documentation: https://d.android.com/studio/projects/add-native-code.html

# Sets the minimum version of CMake required to build the native library.

cmake_minimum_required(VERSION 3.4.1)

# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds them for you.
# Gradle automatically packages shared libraries with your APK.

find_library( # Sets the name of the path variable.
        log-lib

        # Specifies the name of the NDK library that
        # you want CMake to locate.
        log)

#add_library( # Sets the name of the library.
#        ImageProc
#
#        # Sets the library as a shared library.
#        SHARED
#
#        # Provides a relative path to your source file(s).
#        src/main/jni/jaricom.c
#        src/main/jni/jcapimin.c
#        src/main/jni/jcapistd.c
#        src/main/jni/jcarith.c
#        src/main/jni/jccoefct.c
#        src/main/jni/jccolor.c
#        src/main/jni/jcdctmgr.c
#        src/main/jni/jchuff.c
#        src/main/jni/jcinit.c
#        src/main/jni/jcmainct.c
#        src/main/jni/jcmarker.c
#        src/main/jni/jcmaster.c
#        src/main/jni/jcomapi.c
#        src/main/jni/jcparam.c
#        src/main/jni/jcprepct.c
#        src/main/jni/jcsample.c
#        src/main/jni/jctrans.c
#        src/main/jni/jdapimin.c
#        src/main/jni/jdapistd.c
#        src/main/jni/jdarith.c
#        src/main/jni/jdatadst.c
#        src/main/jni/jdatasrc.c
#        src/main/jni/jdcoefct.c
#        src/main/jni/jdcolor.c
#        src/main/jni/jddctmgr.c
#        src/main/jni/jdhuff.c
#        src/main/jni/jdinput.c
#        src/main/jni/jdmainct.c
#        src/main/jni/jdmarker.c
#        src/main/jni/jdmaster.c
#        src/main/jni/jdmerge.c
#        src/main/jni/jdpostct.c
#        src/main/jni/jdsample.c
#        src/main/jni/jdtrans.c
#        src/main/jni/jerror.c
#        src/main/jni/jfdctflt.c
#        src/main/jni/jfdctfst.c
#        src/main/jni/jfdctint.c
#        src/main/jni/jidctflt.c
#        src/main/jni/jidctfst.c
#        src/main/jni/jidctint.c
#        src/main/jni/jmemmgr.c
#        src/main/jni/jmemnobs.c
#        src/main/jni/jquant1.c
#        src/main/jni/jquant2.c
#        src/main/jni/jutils.c
#        src/main/jni/ImageProc.c
#        )
#
## Searches for a specified prebuilt library and stores the path as a
## variable. Because CMake includes system libraries in the search path by
## default, you only need to specify the name of the public NDK library
## you want to add. CMake verifies that the library exists before
## completing its build.
#
#
#
## Specifies libraries CMake should link to your target library. You
## can link multiple libraries, such as libraries you define in this
## build script, prebuilt third-party libraries, or system libraries.
#
#target_link_libraries( # Specifies the target library.
#        ImageProc
#
#        # Links the target library to the log library
#        # included in the NDK.
#        ${log-lib}
#        -ljnigraphics)

add_library( # Sets the name of the library.
        V4L2Camera

        # Sets the library as a shared library.
        SHARED

        # Provides a relative path to your source file(s).
        src/main/jni/cn_yulr_v4l2multicamera_V4L2Camera.cpp
        )

target_link_libraries( # Specifies the target library.
        V4L2Camera

        # Links the target library to the log library
        # included in the NDK.
        ${log-lib})
